package com.yj.jason.jsondemo;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MDActivity extends AppCompatActivity implements View.OnClickListener{

    private Button btn_toolbar,btn_collapsing;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_md);
        btn_toolbar=(Button)findViewById(R.id.btn_toolbar);
        btn_collapsing=(Button)findViewById(R.id.btn_collapsing);

        btn_toolbar.setOnClickListener(this);
        btn_collapsing.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_toolbar:
                startActivity(new Intent(this,MDToolBarActivity.class));
                break;
            case R.id.btn_collapsing:
                startActivity(new Intent(this,MDCoolapsingActivity.class));
                break;
        }
    }
}
